//
//  TKYMineDetaileController.m
//  StationHouseHelper
//
//  Created by apple on 2018/6/22.
//  Copyright © 2018年 铁科院. All rights reserved.
//

#import "TKYMineDetaileController.h"
#import "TKYEdittingDataCell.h"
@interface TKYMineDetaileController ()<UITableViewDelegate,UITableViewDataSource>

@property (nonatomic, strong)BaseTabelView *tabelView;

@end

@implementation TKYMineDetaileController

- (void)viewDidLoad {
    [super viewDidLoad];
    //设置界面
    [self setUPUI];
    // Do any additional setup after loading the view.
}

/**
 设置界面
 */
- (void)setUPUI{
    self.navigationItem.title = @"成员信息";
    self.navigationController.navigationBar.barTintColor = KNavColor;
    self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
    [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor whiteColor],NSFontAttributeName:[UIFont systemFontOfSize:19.0]}];
    
    [self.view addSubview:self.tabelView];
}

#pragma UITableViewDelegate,UITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 9;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    if (indexPath.row == 0) {
        return 80;
    }
    return 44;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    TKYEdittingDataCell *cell = [tableView dequeueReusableCellWithIdentifier:KEdittingDataCellID];
    
    switch (indexPath.row ) {
        case 0:{
            cell.titleLabel.text = @"头像";
            cell.contentLabel.hidden = YES;
            cell.contentTextField.hidden = YES;
            cell.headerImageV.image = [UIImage imageNamed:@"member_selected"];
            break;
        }
        case 1:{
            cell.titleLabel.text = @"姓名";
            cell.contentLabel.text = @"张某某";
            cell.contentLabel.hidden = NO;
            cell.contentTextField.hidden = YES;
            cell.headerImageV.hidden = YES;
            break;
        }case 2:{
            cell.titleLabel.text = @"性别";
            cell.contentLabel.hidden = NO;
              cell.contentLabel.text = @"男";
            cell.contentTextField.hidden = YES;
          
            cell.headerImageV.hidden = YES;
            break;
        }case 3:{
            cell.titleLabel.text = @"工号";
            cell.contentLabel.hidden = NO;
            cell.contentLabel.text = @"23454wq";
            cell.contentTextField.hidden = YES;
            cell.headerImageV.hidden = YES;
            break;
        }case 4:{
            cell.titleLabel.text = @"手机";
            cell.contentLabel.hidden = NO;
            cell.contentLabel.text = @"1571145634364";
            cell.contentTextField.hidden = YES;
            cell.headerImageV.hidden = YES;
            break;
        }case 5:{
            cell.titleLabel.text = @"邮箱";
            cell.contentLabel.hidden = NO;
            cell.contentLabel.text = @"qq.com";
            cell.contentTextField.hidden = YES;
            cell.headerImageV.hidden = YES;
            break;
        }case 6:{
            cell.titleLabel.text = @"公司";
            cell.contentLabel.hidden = NO;
            cell.contentLabel.text = @"北京经纬";
            cell.contentTextField.hidden = YES;
            cell.headerImageV.hidden = YES;
            break;
        }case 7:{
            cell.titleLabel.text = @"部门";
            cell.contentLabel.hidden = NO;
            cell.contentLabel.text = @"工程部";

            cell.contentTextField.hidden = YES;
            
            
            cell.headerImageV.hidden = YES;
            break;
        }case 8:{
            cell.titleLabel.text = @"职务";
            cell.contentLabel.hidden = NO;
            cell.contentLabel.text = @"bim工程师";
            cell.contentTextField.hidden = YES;
           
            cell.headerImageV.hidden = YES;
            break;
        }
            
        default:
            break;
    }
    return cell;
}
- (BaseTabelView *)tabelView{
    if (_tabelView == nil) {
        _tabelView = [[BaseTabelView alloc]initWithFrame:CGRectMake(0, MyNavBarHeight, kScreenWidth, kScreenHeight - MyNavBarHeight)];
        _tabelView.delegate = self;
        _tabelView.dataSource = self;
        [_tabelView registerNib:[UINib nibWithNibName:@"TKYEdittingDataCell" bundle:nil] forCellReuseIdentifier:KEdittingDataCellID];
    }
    return _tabelView;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
